package com.lovo.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Description:
 *
 * @author LiuChengQi
 * @date Created on 2020/11/19
 */
@Entity
@Table(name="info_1119")
@Data
@NoArgsConstructor
public class InfoDO implements Serializable {
    @Id
    @GenericGenerator(name="idGenerator", strategy="uuid")
    @GeneratedValue(generator="idGenerator")
    @Column(name = "i_id")
    private String id;
    @Column(name = "i_name")
    private String name;
    @ManyToOne()
    @JoinColumn(name="fk_sid")
    @JsonIgnore
    private StudentDO studentDO;

    public InfoDO(String name) {
        this.name = name;
    }

//    @Override
//    public String toString() {
//        return "InfoDO{" +
//                "id='" + id + '\'' +
//                ", name='" + name + '\'' +
//                '}';
//    }
}
